<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<title>后盾招聘企业招聘-教学项目</title>
	<link rel="stylesheet" type="text/css" href="http://localhost/hdjob/Static/Css/category-search.css">
	<script type='text/javascript' src='http://localhost/hdjob/hdphp/hdphp/Extend/Org/Jquery/jquery-1.8.2.min.js'></script>
<link href='http://localhost/hdjob/hdphp/hdphp/../hdjs/css/hdjs.css' rel='stylesheet' media='screen'>
<script src='http://localhost/hdjob/hdphp/hdphp/../hdjs/js/hdjs.js'></script>
<script src='http://localhost/hdjob/hdphp/hdphp/../hdjs/js/slide.js'></script>
<script src='http://localhost/hdjob/hdphp/hdphp/../hdjs/org/cal/lhgcalendar.min.js'></script>
<script type='text/javascript'>
HOST = '<?php echo $GLOBALS['user']['HOST'];?>';
ROOT = '<?php echo $GLOBALS['user']['ROOT'];?>';
WEB = '<?php echo $GLOBALS['user']['WEB'];?>';
URL = '<?php echo $GLOBALS['user']['URL'];?>';
HDPHP = '<?php echo $GLOBALS['user']['HDPHP'];?>';
HDPHPDATA = '<?php echo $GLOBALS['user']['HDPHPDATA'];?>';
HDPHPTPL = '<?php echo $GLOBALS['user']['HDPHPTPL'];?>';
HDPHPEXTEND = '<?php echo $GLOBALS['user']['HDPHPEXTEND'];?>';
APP = '<?php echo $GLOBALS['user']['APP'];?>';
CONTROL = '<?php echo $GLOBALS['user']['CONTROL'];?>';
METH = '<?php echo $GLOBALS['user']['METH'];?>';
GROUP = '<?php echo $GLOBALS['user']['GROUP'];?>';
TPL = '<?php echo $GLOBALS['user']['TPL'];?>';
CONTROLTPL = '<?php echo $GLOBALS['user']['CONTROLTPL'];?>';
STATIC = '<?php echo $GLOBALS['user']['STATIC'];?>';
PUBLIC = '<?php echo $GLOBALS['user']['PUBLIC'];?>';
HISTORY = '<?php echo $GLOBALS['user']['HISTORY'];?>';
HTTPREFERER = '<?php echo $GLOBALS['user']['HTTPREFERER'];?>';
</script>
	<script type="text/javascript" src="http://localhost/hdjob/Static/Js/ajax_pos.js"></script>
	<script type="text/javascript" src="http://localhost/hdjob/Static/Js/ajax_city.js"></script>
	<script type="text/javascript" src="http://localhost/hdjob/Static/Js/category-search.js"></script>
	<script type="text/javascript" src="http://localhost/hdjob/Static/Js/backTop.js"></script>
	<!-- <script type="text/javascript" src="http://localhost/hdjob/Static/Js/pos-show.js"></script> -->
<script type="text/javascript">
	var uid = "<?php echo $_SESSION['uid'];?>";
	var rid = "<?php echo $_SESSION['rid'];?>"
	$(function(){
		$('.apply').click(function() {
			//如果没有登录则弹出快速登录窗口
			if(!uid){
				show_div($('.login_bg'),$('.quickLogin_box'),10);
				return false;
			}
			//企业会员不能申请职位
			if(rid != 1){
				show_div($('.people_apply_bg'),$('.people_apply_box'),90);
				return false;
			}
			// posname cpid company_uid
			var posname = $(this).attr('posname');
			var cpid = $(this).attr('cpid');
			var company_uid = $(this).attr('company_uid');


			
			var html = '<li>\
							<label for="" class="need_apply">\
								<input type="checkbox" checked="checked" name="position_cpid" value="' + cpid + '" class="position_input">\
								<span class="company_name_span">' + posname + '</span>\
							</label>\
						</li>';
			

			//异步检测当前用户是否可以申请职位
			$.ajax({
				url : CONTROL + '&m=ajax_check_resume',
				dataType : 'json',
				type : 'get',
				success:function(data){
					//如果可以申请，则弹出信息框
					if(data == 1){
						$('.want_invite').html(html);
						//给隐藏域设置内容,设置公司uid
						$('input[name=company_uid]').val(company_uid);
						// 弹出信息框
						show_div($('.loginCom_bg'),$('.loginCom_box'));
					}else{
						show_div($('.people_applyerror_bg'),$('.people_applyerror_box'),10);
					}
				}
			})


			
		});

		$('form[name=apply_form_submit]').submit(function() {
			var f = false;
			$('input[name=resume1_reid]').each(function() {
				if($(this).attr('checked') == 'checked'){
					f = true;
				}
			});

			if(!f){
				alert('请选择简历');
				return false;
			}

			if(!$('input[name=position_cpid]').attr('checked')){
				alert('请选择职位');
				return false;
			}

			var data = $(this).serialize();
			$.ajax({
				url : CONTROL + '&m=ajax_add_apply',
				type : 'post',
				dataType : 'json',
				data : data,
				success:function(data){
					data = parseInt(data);
				 // * 0 申请失败
			  //    * 1 申请成功
			  //    * 2 申请重复
			  //    * 3 申请职位一天不能超过10个
			  		$('.loginCom_bg,.loginCom_box,BG').hide();
					if(data == 0){
						alert('申请失败');
						return false;
					}
			  		
					switch(data){
						case 1:
							show_div($('.apply_success_bg'),$('.apply_success_box'));
							break;
						case 2:
							show_div($('.people_applyerror_bg'),$('.people_applyerror_box'));
							break;
						case 3:
							alert('一天不能申请超过10个职位');
							break;
					}
				}
			})

		});
		
	})

</script>
<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?>	<link rel="stylesheet" type="text/css" href="http://localhost/hdjob/Static/Css/style.css" />
	<link rel="stylesheet" type="text/css" href="http://localhost/hdjob/Static/Css/common.css">
	<script type="text/javascript" src="http://localhost/hdjob/Static/Js/backTop.js"></script>
</head>
<body>

<!-- 载入公共头部 -->
	<!-- 最顶部灰色条开始 -->
	<div class="head_top">
		<div class="head_top_box">
			<!-- 左边盒子 -->
				<?php if(isset($_SESSION['uid']) && isset($_SESSION['username'])){?>
				<!-- 登录以后 -->
				<div class="head_top_l">
					<span class="top_login">
						欢迎    
						<a href="" class="name" style="color:#339900"><?php echo $_SESSION['username'];?></a>
					   登录！  
					   <?php if($_SESSION["rid"] == 1){?>  
					   <a href="<?php echo U('People/Index/index');?>" style="color:#0066CC">[会员中心]</a>
					   <?php  }else{ ?>
					    <a href="<?php echo U('Company/Index/index');?>" style="color:#0066CC">[会员中心]</a>
						<?php }?>
					   <a href="<?php echo U('Member/Login/out');?>" style="color:#0066CC">[退出]</a>
					</span>
				</div>
				<?php  }else{ ?>
				<!-- 未登录 -->
				<div class="head_top_l">
					<span class="top_login">
					欢迎来到PHP招聘网！   
						<a href="<?php echo U('Member/Login/index');?>">[登录]</a>
						<a href="<?php echo U('Member/Register/index');?>">[免费注册]</a>
					</span>
				</div>
			<?php }?>
			<!-- 左边盒子结束 -->
		</div>
	</div>
	<!-- 最顶部灰色条结束 -->
		<!-- 头部开始 -->
	<div class="head">
		<a href="http://localhost/hdjob" class="logo"><img src="http://localhost/hdjob/Static/images/logo_front.png" alt="" /></a>
	</div>
<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!-- 头部结束 -->
<div class="nav_list">

		<a href="http://localhost/hdjob/index.php" <?php if(CONTROL == "Index"||CONTROL == "Company"||CONTROL == "Pos"){?>class="blue"<?php  }else{ ?> class="two"<?php }?>><span>首  页</span></a>
		<a href="<?php echo U('Category/Invite/index');?> "<?php if(CONTROL == "Invite"){?>class="blue"<?php  }else{ ?> class="two"<?php }?>><span>企业招聘</span></a>
		<a href="<?php echo U('Category/ResumeShow/index');?>" <?php if(CONTROL == "ResumeShow"){?>class="blue"<?php  }else{ ?> class="two"<?php }?>><span>求职信息</span></a>
		<a href="<?php echo U('Member/Login/index');?>" <?php if(CONTROL == "Member"){?>class="blue"<?php  }else{ ?> class="two"<?php }?>><span>会员中心</span></a>
	<!-- 右边分享盒子开始 -->
	<div class="share">
		<div class="bshare-custom"><a title="分享到QQ空间" class="bshare-qzone"></a><a title="分享到新浪微博" class="bshare-sinaminiblog"></a><a title="分享到人人网" class="bshare-renren"></a><a title="分享到腾讯微博" class="bshare-qqmb"></a><a title="分享到网易微博" class="bshare-neteasemb"></a><a title="更多平台" class="bshare-more bshare-more-icon more-style-addthis"></a><span class="BSHARE_COUNT bshare-share-count">0</span></div><script type="text/javascript" charset="utf-8" src="http://static.bshare.cn/b/buttonLite.js#style=-1&amp;uuid=&amp;pophcol=2&amp;lang=zh"></script><script type="text/javascript" charset="utf-8" src="http://static.bshare.cn/b/bshareC0.js"></script>
	</div>
	<!-- 右边分享盒子结束 -->
</div>
	<!-- 导航栏底边框盒子 -->
	<div class="nav_bottom"></div>
	<!-- 导航栏底边框盒子结束 -->
<!-- 职位搜索盒子开始 -->
	<div class="job_search">
		<div class="top_tit">
			<div class="left">职位搜索</div>
			<div class="right">
				<a href="">网站首页</a>
				<a href="">发布职位</a>
				<a href="">填写简历</a>
			</div>
		</div>
		<form action="" method="get">
			<div class="tit">
				工作地区：
				<div class="item">
					<select name="city_one"  class="select_box_little" >
						<option value="0">请选择</option>
						<?php if(is_array($topCity)):?><?php  foreach($topCity as $k=>$v){ ?>
						<?php if($k == $_GET['city_one']){?>
							<option value="<?php echo $k;?>" selected="selected"><?php echo $v;?></option>
						<?php  }else{ ?>
							<option value="<?php echo $k;?>"><?php echo $v;?></option>
						<?php }?>
						<?php }?><?php endif;?>
					</select>
					<select name="city_second">
						<option value="0">请选择</option>
						<?php if(is_array($sonCity)):?><?php  foreach($sonCity as $k=>$v){ ?>
						<?php if($k == $_GET['city_second']){?>
							<option value="<?php echo $k;?>" selected="selected"><?php echo $v;?></option>
						<?php  }else{ ?>
							<option value="<?php echo $k;?>"><?php echo $v;?></option>
						<?php }?>
						<?php }?><?php endif;?>
					</select>
				</div>
			</div>

			<div class="tit two">
				职位类别：&nbsp;
				<div class="item">
					<select class="sel_little" name="pos_one">
						<option value="0">请选择</option>
						<?php if(is_array($topPos)):?><?php  foreach($topPos as $k=>$v){ ?>
						<?php if($k == $_GET['pos_one']){?>
							<option value="<?php echo $k;?>" selected="selected"><?php echo $v;?></option>
						<?php  }else{ ?>
							<option value="<?php echo $k;?>"><?php echo $v;?></option>
						<?php }?>
						<?php }?><?php endif;?>
					</select>
					<select class="sel_little" name="pos_second">
						<option value="0">请选择</option>
						<?php if(is_array($sonPos)):?><?php  foreach($sonPos as $k=>$v){ ?>
						<?php if($k == $_GET['pos_second']){?>
							<option value="<?php echo $k;?>" selected="selected"><?php echo $v;?></option>
						<?php  }else{ ?>
							<option value="<?php echo $k;?>"><?php echo $v;?></option>
						<?php }?>
						<?php }?><?php endif;?>
					</select>
				</div>
			</div>
			<div class="four">
				关键字：
				<div class="key">
					<input type="text" class="keyinput" value='<?php echo $_GET['keyword'];?>' name="keyword"/>
					<div class="radio">
						<label>

							<input type="radio" name="type" value="1" <?php if($_GET["type"] == 1){?>checked='checked'<?php }?>/>
							职位
						</label>
						<label>
							<input type="radio" name="type" value="2" <?php if($_GET["type"] == 2){?>checked='checked'<?php }?>/>
							公司
						</label>
						<label>
							<input type="radio" name="type" value="3" <?php if($_GET["type"] == 3){?>checked='checked'<?php }?>/>
							全文
						</label>
					</div>
				</div>
			</div>

			<div class="item_nature">
				<label for="">
					<input type="checkbox" name="quality[]" value="1"  <?php if(in_array(1,$_GET["quality"])){?>checked='checked'<?php }?>/>
					全职
				</label>
				<label for="">
					<input type="checkbox" name="quality[]" value="2"  <?php if(in_array(2,$_GET["quality"])){?>checked='checked'<?php }?>/>
					兼职
				</label>
				<label for="">
					<input type="checkbox" name="quality[]" value="3"  <?php if(in_array(3,$_GET["quality"])){?>checked='checked'<?php }?>/>
					实习
				</label>
			</div>
			<div class="submit">
				<input type="submit" class="now" value="">
			</div>
	</div>
	<!-- 职位搜索盒子结束 -->
	</form>
		<!-- 更多条件隐藏盒子结束 -->
	<!-- 搜索列表盒子开始 -->
	<div class="job_list">
		<form action="" method="get">
		<?php if(is_array($data)):?><?php  foreach($data as $key=>$value){ ?>
				<div class="list link">
					<a href="" class="name" target="_blank"><?php echo $value['positionname'];?></a>
					<div class="com">
						<a href="" target="_blank"><?php echo $value['companyname'];?></a>
						<img src="http://localhost/hdjob/Static/images/79.gif">
						<?php if($value["weekrest"] == 0){?>
							<img src="http://localhost/hdjob/Static/images/80.gif">
							<img src="http://localhost/hdjob/Static/images/81.gif">
						<?php  }elseif($value["weekrest"] == 1){ ?>
							<img src="http://localhost/hdjob/Static/images/80.gif">
						<?php  }else{ ?>
							<img src="http://localhost/hdjob/Static/images/81.gif">
						<?php }?>
						<?php if($value["insure"] == 0){?>
							<img src="http://localhost/hdjob/Static/images/82.gif">
							<img src="http://localhost/hdjob/Static/images/83.gif">
						<?php  }elseif($value["insure"] == 1){ ?>
							<img src="http://localhost/hdjob/Static/images/82.gif">
						<?php  }else{ ?>
							<img src="http://localhost/hdjob/Static/images/83.gif">
						<?php }?>
					</div>
					<p class="price"><?php echo $value['salary'];?></p>
					<span class="day"><?php echo $value['endtime'];?></span>
					<div class="txt">
						<p class="adds">
							工作地点：<?php echo $value['cityname'];?>    学历要求：<?php echo $value['edu'];?>  | 性别要求：<?php echo $value['sex'];?>  | 招聘人数：<?php echo $value['invitenum'];?>人
						</p>
						<p class="striking">
							<?php echo hd_substr($value['description'],30,'...');?>
						</p>
					</div>
					<div class="sub_right">
						<!-- 申请职位按钮 -->
						<a href="javascript:" class="apply" posname="<?php echo $value['positionname'];?>" cpid="<?php echo $value['cpid'];?>" company_uid="<?php echo $value['cbid'];?>"><img src="http://localhost/hdjob/Static/images/53.gif"></a>
					</div>
				</div>
		<?php }?><?php endif;?>
				<!-- <div class="no_content">
					<p class="orange">抱歉，没有符合该搜索条件的职位。</p>
					<ul>
						<li>您可以：</li>
						<li>重新修改搜索条件后再进行搜索。</li>
						<li>适当减少一些搜索条件，以便能够获得更多的结果。</li>
					</ul>
				</div> -->

			<div class="tit">
			</div>
		</form>
	</div>
	<!-- 搜索列表盒子结束 -->

	<div class="page">
		<div class="page_box">
		<!-- <span class="close">上一页</span>
		<strong class="selfpage">1</strong>
		<span class="close">下一页</span>
		<span class="count">[共1页] [2条记录]</span> -->
			<?php echo $page;?>
		</div>
	</div>

<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!-- 页脚开始 -->
	<div class="footer">
		<!-- 设为首页 -->
		<div class="set">
			<a href="">网站首页</a>
			 | 
			<a href="">关于我们</a>
			 | 
			<a href="">免责声明</a>
			 | 
			<a href="">隐私声明</a>
			 | 
			<a href="">广告服务</a>
			 | 
			<a href="">帮助中心</a>
		</div>
		<!-- 设为首页结束 -->
		<!-- 欢迎加入php群开始 -->
		<div class="wec">
			 欢迎加入PHP交流群 
			 410004417
			  网站备案：<a href="" class="yue">京ICP备*******号-* </a>
			
			  <a href="">
			  	<img src="http://localhost/hdjob/Static/images/pic.gif" alt="" />
			  </a>
		</div>
		<!-- 欢迎加入php群结束 -->
		<!-- 温馨提示开始 -->
		<div class="rem">
			温馨提示：招聘单位无权收取任何费用，请求职者加强自我保护意，按照相关劳动法规保护自身权益，警惕虚假招聘，避免上当受骗
			<br />
			Copyright @ 2011-2015  houdunwang.com  All Right Reserved   本网站部分内容只转载原作的部分内容，若有异议，请与本站负责人联系，我们将予以改正！ 
		</div>
		<!-- 温馨提示结束 -->
	</div>
	<!-- 页脚结束 -->
</body>
</html>

<!-- 返回顶部开始 -->
<div class="backtop_box">
	<a href="javascript:vido(0)" class="backtop"></a>
</div>
<!-- 返回顶部结束 -->
</body>
</html>

<!-- 返回顶部开始 -->
<div class="backtop_box">
	<a href="javascript:vido(0)" class="backtop"></a>
</div>
<!-- 返回顶部结束 -->

<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!-- 申请职位弹窗操作 -->
<link rel="stylesheet" type="text/css" href="http://localhost/hdjob/Static/Css/apply_alert.css"/>

<!-- ＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝申请职位弹窗开始＝＝＝＝＝＝＝＝＝＝＝＝＝ -->
<?php if(!isset($_SESSION['uid'])||!isset($_SESSION['username'])){?>
<form action="<?php echo U('Member/Login/index');?>" method="post">
<!-- 未登陆时弹出窗开始 -->
	<div class="login_bg">
	</div>
	<div class="quickLogin_box">
		<div class="quickLogin_title">
			<h4>申请职位</h4>
			<span class="close"></span>	
		</div>
		<div class="quickLogin_content">
			<div class="login_tit">快速登录</div>
			<table cellspacing="0" cellpadding="5">
				<tr>
					<td class="name">用户名：</td>
					<td>
						<input type="text" name="username">
					</td>
				</tr>
				<tr>
					<td class="name">密  码：</td>
					<td>
						<input type="password" name="password">
					</td>
				</tr>
				<tr>
					<td class="name"></td>
					<td>
						<label for="">
						<input type="hidden" name="deal" value='1'/>
							<input type="checkbox" name="auto" value="1" class="check" checked="checked">
							       一周内自动登录
						</label>
					</td>
				</tr>
				<tr>
					<td class="name"></td>
					<td colspan="2" class="subm">
						<input type="submit" name="" value="登陆" class="sub">
						<a href="" class="pwd">忘记密码？</a>
					</td>
				</tr>
				<tr>
					<td class="name bTop"></td>
					<td class="link_lan">
						还没有账号？
						<a href="">免费注册</a>
					</td>
				</tr>
			</table>
		</div>
	</div>
</form>
<!-- 未登陆时弹出窗结束 -->
<?php  }else{ ?>
<?php if($_SESSION['rid'] == 2){?>
<!-- rid为1个人用户 -->
<!-- 必须是个人用户弹出盒子开始-->
	<div class="show_bank people_apply_bg">
	</div>
	<div class="bank people_apply_box">
		<div class="title">
			<h4>申请职位</h4>
			<span class="close"></span>
		</div>
		<div class="content">必须是个人用户才能申请职位！</div>
	</div>
<!-- 必须是个人用户弹出盒子开始 -->
<?php  }else{ ?>
<!-- 当前用户简历状态，如果是成功，显示申请职位弹窗，否则告诉用户申请失败 -->
<form action="javascript:;" method="post" name="apply_form_submit">
<!-- 登陆后弹出申请职位窗口 -->
<div class="loginCom_bg"></div>
<div class="loginCom_box">
	<div class="loginCom_box_title">
		<h4>申请职位</h4>
		<span class="close"></span>
	</div>
	<div class="loginCom_content">
		<div class="content_tip">
		</div>
		<table width="100%" cellspacing="5" border="0" align="center">
			<tr>
				<td class="name">要申请的职位：</td>
				<td valign="top" class="want_invite">
					<ul>
						
					</ul>
					
				</td>
			</tr>
			<tr>
				<td class="name">选择简历：</td>
				<td>
					<?php if(is_array($resume)):?><?php  foreach($resume as $v){ ?>
						<label for="">
							<input type="radio" name="resume1_reid" value="<?php echo $v['reid'];?>">
							<?php echo $v['resumename'];?>
						</label>
						<a href="" target="_blank">[预览]</a>
					<?php }?><?php endif;?>
				</td>
			</tr>

			<tr>
				<td class="name">其他说明：</td>
				<td>
					<textarea name="explain"></textarea>
				</td>
			</tr>
			<tr>
				<td class="name"></td>
				<td>
					<input type="hidden" name="company_uid" value="<?php echo $data['cbid'];?>">
					<input type="submit" value="申请" name="" class="apply_sub">
				</td>
			</tr>
		</table>
	</div>
</div>
</form>
<!-- 登陆后弹出申请职位窗口结束 -->
<?php if($status){?>
	<!-- 申请成功盒子 -->
	<div class="success_bg apply_success_bg">
	</div>
	<div class="success_box apply_success_box">
		<div class="success_title apply_success_box">
			<h4>申请职位</h4>
			<span class="close"></span>
		</div>
		<div class="success_content">
			<img src="http://localhost/hdjob/Static/Images/13.png" alt="" />
			<span class="success_txt">职位申请成功!</span>
			<div class="com_box">
				<a href="">查看已申请的职位</a>
				<a href="javascript:" class="close_success">申请完成</a>
			</div>
		</div>
	</div>
	<!-- 申请成功盒子结束 -->

	<!-- 添加失败弹出盒子开始-->
	<div class="show_bank people_applyerror_bg">
	</div>
	<div class="bank people_applyerror_box">
		<div class="title">
			<h4>申请职位</h4>
			<span class="close"></span>
		</div>
		<div class="content">申请失败，收已经申请过此职位</div>
	</div>
	<!-- 添加失败弹出盒子结束 -->
<?php  }else{ ?>
	<!-- 由于用户简历等不完善信息的错误窗体 -->
	<div class="show_bank people_applyerror_bg">
	</div>
	<div class="bank people_applyerror_box">
		<div class="title">
			<h4>申请职位</h4>
			<span class="close"></span>
		</div>
		<div class="content">你的简历不完整或者已经到期！</div>
	</div>
	<!-- 由于用户简历等不完善信息的错误窗体 -->
<?php }?>
<?php }?>
<?php }?>
<!-- ＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝申请职位弹窗结束＝＝＝＝＝＝＝＝＝＝＝＝＝ -->